package com.codejiwei.flink.practice;

import com.codejiwei.flink.source.WaterSensorSocketSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @author jiwei
 * @description
 * @date 2023/5/19 16:11
 */
public class Flink_Source_Custom {
    public static void main(String[] args) throws Exception {

        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

        env.addSource(new WaterSensorSocketSource("localhost", 8889))
                .print();

        env.execute();

    }
}
